home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / CIncludes / Lists.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  4.3 KB  |  149 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Lists.h
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12. #ifndef __LISTS__
  13. #define __LISTS__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. #endif
  18.  
  19. #ifndef __CONTROLS__
  20. #include <Controls.h>
  21. #endif
  22.  
  23. #ifndef __MEMORY__
  24. #include <Memory.h>
  25. #endif
  26.  
  27.  
  28. enum {
  29.  
  30.     lDoVAutoscroll = 2,
  31.     lDoHAutoscroll = 1,
  32.     lOnlyOne = -128,
  33.     lExtendDrag = 64,
  34.     lNoDisjoint = 32,
  35.     lNoExtend = 16,
  36.     lNoRect = 8,
  37.     lUseSense = 4,
  38.     lNoNilHilite = 2,
  39.     lInitMsg = 0,
  40.     lDrawMsg = 1,
  41.     lHiliteMsg = 2,
  42.     lCloseMsg = 3
  43. };
  44.  
  45. typedef Point Cell;
  46.  
  47. typedef char DataArray[32001],*DataPtr,**DataHandle;
  48. typedef pascal short (*SearchProcPtr)(Ptr aPtr, Ptr bPtr, short aLen, short bLen);
  49.  
  50. struct ListRec {
  51.     Rect rView;
  52.     GrafPtr port;
  53.     Point indent;
  54.     Point cellSize;
  55.     Rect visible;
  56.     ControlHandle vScroll;
  57.     ControlHandle hScroll;
  58.     char selFlags;
  59.     Boolean lActive;
  60.     char lReserved;
  61.     char listFlags;
  62.     long clikTime;
  63.     Point clikLoc;
  64.     Point mouseLoc;
  65.     ProcPtr lClikLoop;
  66.     Cell lastClick;
  67.     long refCon;
  68.     Handle listDefProc;
  69.     Handle userHandle;
  70.     Rect dataBounds;
  71.     DataHandle cells;
  72.     short maxIndex;
  73.     short cellArray[1];
  74. };
  75.  
  76. typedef struct ListRec ListRec;
  77. typedef ListRec *ListPtr, **ListHandle;
  78.  
  79.  
  80. #ifdef __cplusplus
  81. extern "C" {
  82. #endif
  83. ListHandle lnew(Rect *rView,Rect *dataBounds,Point *cSize,short theProc,
  84.     WindowPtr theWindow,Boolean drawIt,Boolean hasGrow,Boolean scrollHoriz,
  85.     Boolean scrollVert); 
  86. pascal ListHandle LNew(const Rect *rView,const Rect *dataBounds,Point cSize,
  87.     short theProc,WindowPtr theWindow,Boolean drawIt,Boolean hasGrow,Boolean scrollHoriz,
  88.     Boolean scrollVert)
  89.     = {0x3F3C,0x0044,0xA9E7}; 
  90. pascal void LDispose(ListHandle lHandle)
  91.     = {0x3F3C,0x0028,0xA9E7}; 
  92. pascal short LAddColumn(short count,short colNum,ListHandle lHandle)
  93.     = {0x3F3C,0x0004,0xA9E7}; 
  94. pascal short LAddRow(short count,short rowNum,ListHandle lHandle)
  95.     = {0x3F3C,0x0008,0xA9E7}; 
  96. pascal void LDelColumn(short count,short colNum,ListHandle lHandle)
  97.     = {0x3F3C,0x0020,0xA9E7}; 
  98. pascal void LDelRow(short count,short rowNum,ListHandle lHandle)
  99.     = {0x3F3C,0x0024,0xA9E7}; 
  100. pascal Boolean LGetSelect(Boolean next,Cell *theCell,ListHandle lHandle)
  101.     = {0x3F3C,0x003C,0xA9E7}; 
  102. pascal Cell LLastClick(ListHandle lHandle)
  103.     = {0x3F3C,0x0040,0xA9E7}; 
  104. pascal Boolean LNextCell(Boolean hNext,Boolean vNext,Cell *theCell,ListHandle lHandle)
  105.     = {0x3F3C,0x0048,0xA9E7}; 
  106. pascal Boolean LSearch(const void *dataPtr,short dataLen,SearchProcPtr searchProc,
  107.     Cell *theCell,ListHandle lHandle)
  108.     = {0x3F3C,0x0054,0xA9E7}; 
  109. pascal void LSize(short listWidth,short listHeight,ListHandle lHandle)
  110.     = {0x3F3C,0x0060,0xA9E7}; 
  111. pascal void LDoDraw(Boolean drawIt,ListHandle lHandle)
  112.     = {0x3F3C,0x002C,0xA9E7}; 
  113. pascal void LScroll(short dCols,short dRows,ListHandle lHandle)
  114.     = {0x3F3C,0x0050,0xA9E7}; 
  115. pascal void LAutoScroll(ListHandle lHandle)
  116.     = {0x3F3C,0x0010,0xA9E7}; 
  117. pascal void LUpdate(RgnHandle theRgn,ListHandle lHandle)
  118.     = {0x3F3C,0x0064,0xA9E7}; 
  119. pascal void LActivate(Boolean act,ListHandle lHandle)
  120.     = {0x4267,0xA9E7}; 
  121. pascal void LCellSize(Point cSize,ListHandle lHandle)
  122.     = {0x3F3C,0x0014,0xA9E7}; 
  123. pascal Boolean LClick(Point pt,short modifiers,ListHandle lHandle)
  124.     = {0x3F3C,0x0018,0xA9E7}; 
  125. pascal void LAddToCell(const void *dataPtr,short dataLen,Cell theCell,ListHandle lHandle)
  126.     = {0x3F3C,0x000C,0xA9E7}; 
  127. pascal void LClrCell(Cell theCell,ListHandle lHandle)
  128.     = {0x3F3C,0x001C,0xA9E7}; 
  129. pascal void LGetCell(void *dataPtr,short *dataLen,Cell theCell,ListHandle lHandle)
  130.     = {0x3F3C,0x0038,0xA9E7}; 
  131. pascal void LFind(short *offset,short *len,Cell theCell,ListHandle lHandle)
  132.     = {0x3F3C,0x0034,0xA9E7}; 
  133. pascal void LRect(Rect *cellRect,Cell theCell,ListHandle lHandle)
  134.     = {0x3F3C,0x004C,0xA9E7}; 
  135. pascal void LSetCell(const void *dataPtr,short dataLen,Cell theCell,ListHandle lHandle)
  136.     = {0x3F3C,0x0058,0xA9E7}; 
  137. pascal void LSetSelect(Boolean setIt,Cell theCell,ListHandle lHandle)
  138.     = {0x3F3C,0x005C,0xA9E7}; 
  139. pascal void LDraw(Cell theCell,ListHandle lHandle)
  140.     = {0x3F3C,0x0030,0xA9E7}; 
  141. void ldraw(Cell *theCell,ListHandle lHandle); 
  142. Boolean lclick(Point *pt,short modifiers,ListHandle lHandle); 
  143. void lcellsize(Point *cSize,ListHandle lHandle); 
  144. #ifdef __cplusplus
  145. }
  146. #endif
  147.  
  148. #endif
  149.